<!--

     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.

-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- **************************************************************** -->
<!-- *  PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
<!-- *  i.e. only iterate & print data where possible. Thanks, Jez. * -->
<!-- **************************************************************** -->

<html>
<head>
    <!-- Generated by groovydoc (2.4.5) on Mon Sep 12 08:35:15 CEST 2016 -->
    <title>AsyncFile (Groovy Documentation)</title>
    <meta name="date" content="2016-09-12">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
    <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
    <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
    parent.document.title="AsyncFile (Groovy Documentation)";
}
//-->
</script>
<noscript>
    <div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
    <!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="../../../../../overview-summary.html">Overview</a></li>
        <li><a href="package-summary.html">Package</a></li>
        <li class="navBarCell1Rev">Class</li>
        <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
        <li><a href="../../../../../index-all.html">Index</a></li>
        <li><a href="../../../../../help-doc.html">Help</a></li>
    </ul>
</div>

<div class="subNav">
    <div>
        <ul class="navList">
            <li><a href="../../../../../index.html?io/vertx/groovy/core/file/AsyncFile" target="_top">Frames</a></li>
            <li><a href="AsyncFile.html" target="_top">No Frames</a></li>
        </ul>
    </div>
    <div>
        <ul class="subNavList">
            <li>Summary:&nbsp;</li>
            Nested&nbsp;&nbsp;&nbsp;Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_summary">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_summary">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
        <ul class="subNavList">
            <li>&nbsp;|&nbsp;Detail:&nbsp;</li>
            Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_detail">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_detail">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
    </div>
    <a name="skip-navbar_top">
        <!--   -->
    </a></div>
<!-- ========= END OF TOP NAVBAR ========= -->

<!-- ======== START OF CLASS DATA ======== -->
<div class="header">

    <div class="subTitle">Package: <strong>io.vertx.groovy.core.file</strong></div>

    <h2 title="[Groovy] Class AsyncFile" class="title">[Groovy] Class AsyncFile</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><ul class="inheritance"></ul></li><li>io.vertx.groovy.core.file.AsyncFile
</ul>
<div class="description">
    <ul class="blockList">
        <li class="blockList">

            <dl>
                <dt>All Implemented Interfaces and Traits:</dt>
                <dd><a href='../../../../../io/vertx/groovy/core/streams/ReadStream.html'>ReadStream</a>, <a href='../../../../../io/vertx/groovy/core/streams/WriteStream.html'>WriteStream</a></dd>
            </dl>
            <!-- todo: direct known subclasses -->
            <hr>
            <br>
<pre>@groovy.transform.CompileStatic
class AsyncFile
extends java.lang.Object

</pre>



    <p> Represents a file on the file-system which can be read from, or written to asynchronously.
 <p>
 This class also implements <a href='../../../../../io/vertx/groovy/core/streams/ReadStream.html' title='ReadStream'>ReadStream</a> and
 <a href='../../../../../io/vertx/groovy/core/streams/WriteStream.html' title='WriteStream'>WriteStream</a>. This allows the data to be pumped to and from
 other streams, e.g. an <a href='../../../../../io/vertx/groovy/core/http/HttpClientRequest.html' title='HttpClientRequest'>HttpClientRequest</a> instance,
 using the <a href='../../../../../io/vertx/groovy/core/streams/Pump.html' title='Pump'>Pump</a> class
</p>

          </li>
    </ul>
</div>

<div class="summary">
    <ul class="blockList">
        <li class="blockList">
        <!-- =========== NESTED CLASS SUMMARY =========== -->
        

        <!-- =========== ENUM CONSTANT SUMMARY =========== -->
        
        <!-- =========== FIELD SUMMARY =========== -->
        

        <!-- =========== PROPERTY SUMMARY =========== -->
        

        <!-- =========== ELEMENT SUMMARY =========== -->
        

        
        <!-- ======== CONSTRUCTOR SUMMARY ======== -->
        <ul class="blockList">
                <li class="blockList"><a name="constructor_summary"><!--   --></a>
                    <h3>Constructor Summary</h3>
                    <ul class="blockList">
                    <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructors Summary table">
                        <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
                        <tr>
                            <th class="colFirst" scope="col">Constructor and description</th>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst">
                                <code><a href="#AsyncFile(java.lang.Object)">AsyncFile</a></strong>
                                (java.lang.Object delegate)</code><br></td>
                        </tr>
                        
                    </table>
                   </ul>
              </li>
        </ul>
        

        
        <!-- ========== METHOD SUMMARY =========== -->
        <ul class="blockList">
            
            <li class="blockList"><a name="method_summary"><!--   --></a>
                    <h3>Methods Summary</h3>
                    <ul class="blockList">
                    <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Methods Summary table">
                        <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
                        <tr>
                            <th class="colFirst" scope="col">Type</th>
                            <th class="colLast" scope="col">Name and description</th>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#close()">close</a></strong>()</code><br>Close the file. </td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#close(Handler<AsyncResult<Void>>)">close</a></strong>(io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; handler)</code><br>Close the file. </td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#drainHandler(Handler<Void>)">drainHandler</a></strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; handler)</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#end(io.vertx.groovy.core.buffer.Buffer)">end</a></strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> t)</code><br>Same as <a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html#end' title='AsyncFile.end'>AsyncFile.end</a> but writes some data to the stream before ending.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#end()">end</a></strong>()</code><br>Close the file, see <a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html#close' title='AsyncFile.close'>AsyncFile.close</a>.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#endHandler(Handler<Void>)">endHandler</a></strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; endHandler)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#exceptionHandler(Handler<Throwable>)">exceptionHandler</a></strong>(io.vertx.core.Handler&lt;java.lang.Throwable&gt; handler)</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#flush()">flush</a></strong>()</code><br>Flush any writes made to this file to underlying persistent storage.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#flush(Handler<AsyncResult<Void>>)">flush</a></strong>(io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; handler)</code><br>Same as <a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html#flush' title='AsyncFile.flush'>AsyncFile.flush</a> but the handler will be called when the flush is complete or if an error occurs</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>java.lang.Object</strong></code></td>
                            <td class="colLast"><code><strong><a href="#getDelegate()">getDelegate</a></strong>()</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#handler(Handler<Buffer>)">handler</a></strong>(io.vertx.core.Handler&lt;<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html' title='Buffer'>Buffer</a>&gt; handler)</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#pause()">pause</a></strong>()</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#read(io.vertx.groovy.core.buffer.Buffer, int, long, int, Handler<AsyncResult<Buffer>>)">read</a></strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> buffer, int offset, long position, int length, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html' title='Buffer'>Buffer</a>&gt;&gt; handler)</code><br>Reads <code>length</code> bytes of data from the file at position <code>position</code> in the file, asynchronously.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#resume()">resume</a></strong>()</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#setReadBufferSize(int)">setReadBufferSize</a></strong>(int readBufferSize)</code><br>Sets the buffer size that will be used to read the data from the file. </td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#setReadPos(long)">setReadPos</a></strong>(long readPos)</code><br>Sets the position from which data will be read from when using the file as a <a href='../../../../../io/vertx/groovy/core/streams/ReadStream.html' title='ReadStream'>ReadStream</a>.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#setWritePos(long)">setWritePos</a></strong>(long writePos)</code><br>Sets the position from which data will be written when using the file as a <a href='../../../../../io/vertx/groovy/core/streams/WriteStream.html' title='WriteStream'>WriteStream</a>.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#setWriteQueueMaxSize(int)">setWriteQueueMaxSize</a></strong>(int maxSize)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#write(io.vertx.groovy.core.buffer.Buffer)">write</a></strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> data)</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#write(io.vertx.groovy.core.buffer.Buffer, long, Handler<AsyncResult<Void>>)">write</a></strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> buffer, long position, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; handler)</code><br>Write a <a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html' title='Buffer'>Buffer</a> to the file at position <code>position</code> in the file, asynchronously.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>boolean</strong></code></td>
                            <td class="colLast"><code><strong><a href="#writeQueueFull()">writeQueueFull</a></strong>()</code><br>This will return <code>true</code> if there are more bytes in the write queue than the value set using <a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html#setWriteQueueMaxSize' title='AsyncFile.setWriteQueueMaxSize'>AsyncFile.setWriteQueueMaxSize</a></td>
                        </tr>
                        
                    </table>
                   </ul>
              </li>
            
            <li class="blockList"><a name="method_summary"><!--   --></a>
                    <h3>Inherited Methods Summary</h3>
                    <ul class="blockList">
                    <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
                        <caption><span>Inherited Methods</span><span class="tabEnd">&nbsp;</span></caption>
                        <tr>
                            <th class="colFirst" scope="col">Methods inherited from class</th>
                            <th class="colLast" scope="col">Name</th>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>class java.lang.Object</strong></code></td>
                            <td class="colLast"><code>java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()</code></td>
                        </tr>
                    </table>
                   </ul>
              </li>
                
        </ul>
        
    </li>
    </ul>
</div>

<div class="details">
    <ul class="blockList">
        <li class="blockList">
           

            

            

            

            
            <!-- =========== CONSTRUCTOR DETAIL =========== -->
            <ul class="blockList">
                <li class="blockList"><a name="constructor_detail">
                    <!--   -->
                </a>
                    <h3>Constructor Detail</h3>
                    
                        <a name="AsyncFile(java.lang.Object)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><strong>AsyncFile</strong>(java.lang.Object delegate)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                </li>
            </ul>
            


            
            <!-- =========== METHOD DETAIL =========== -->
            <ul class="blockList">
                <li class="blockList"><a name="method_detail">
                    <!--   -->
                </a>
                    <h3>Method Detail</h3>
                    
                        <a name="close()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>close</strong>()</h4>
                                <p> Close the file. The actual close happens asynchronously.
   </p>
                            </li>
                        </ul>
                    
                        <a name="close(Handler<AsyncResult<Void>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>close</strong>(io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; handler)</h4>
                                <p> Close the file. The actual close happens asynchronously.
 The handler will be called when the close is complete, or an error occurs.
   <DL><DT><B>Parameters:</B></DT><DD><code>handler</code> -  the handler</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="drainHandler(Handler<Void>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>drainHandler</strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; handler)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="end(io.vertx.groovy.core.buffer.Buffer)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>end</strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> t)</h4>
                                <p> Same as <a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html#end' title='AsyncFile.end'>AsyncFile.end</a> but writes some data to the stream before ending. 
   <DL><DT><B>Parameters:</B></DT><DD>t</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="end()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>end</strong>()</h4>
                                <p> Close the file, see <a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html#close' title='AsyncFile.close'>AsyncFile.close</a>.
   </p>
                            </li>
                        </ul>
                    
                        <a name="endHandler(Handler<Void>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>endHandler</strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; endHandler)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="exceptionHandler(Handler<Throwable>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>exceptionHandler</strong>(io.vertx.core.Handler&lt;java.lang.Throwable&gt; handler)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="flush()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>flush</strong>()</h4>
                                <p> Flush any writes made to this file to underlying persistent storage.
 <p>
 If the file was opened with <code>flush</code> set to <code>true</code> then calling this method will have no effect.
 <p>
 The actual flush will happen asynchronously.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="flush(Handler<AsyncResult<Void>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>flush</strong>(io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; handler)</h4>
                                <p> Same as <a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html#flush' title='AsyncFile.flush'>AsyncFile.flush</a> but the handler will be called when the flush is complete or if an error occurs <DL><DT><B>Returns:</B></DT><DD></DD></DL><DL><DT><B>Parameters:</B></DT><DD>handler</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="getDelegate()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>java.lang.Object <strong>getDelegate</strong>()</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="handler(Handler<Buffer>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>handler</strong>(io.vertx.core.Handler&lt;<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html' title='Buffer'>Buffer</a>&gt; handler)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="pause()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>pause</strong>()</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="read(io.vertx.groovy.core.buffer.Buffer, int, long, int, Handler<AsyncResult<Buffer>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>read</strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> buffer, int offset, long position, int length, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html' title='Buffer'>Buffer</a>&gt;&gt; handler)</h4>
                                <p> Reads <code>length</code> bytes of data from the file at position <code>position</code> in the file, asynchronously.
 <p>
 The read data will be written into the specified <code>Buffer buffer</code> at position <code>offset</code>.
 <p>
 If data is read past the end of the file then zero bytes will be read.<p>
 When multiple reads are invoked on the same file there are no guarantees as to order in which those reads actually occur.
 <p>
 The handler will be called when the close is complete, or if an error occurs.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>buffer</code> -  the buffer to read into</DD><DD><code>offset</code> -  the offset into the buffer where the data will be read</DD><DD><code>position</code> -  the position in the file where to start reading</DD><DD><code>length</code> -  the number of bytes to read</DD><DD><code>handler</code> -  the handler to call when the write is complete</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="resume()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>resume</strong>()</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="setReadBufferSize(int)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>setReadBufferSize</strong>(int readBufferSize)</h4>
                                <p> Sets the buffer size that will be used to read the data from the file. Changing this value will impact how much
 the data will be read at a time from the file system.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>readBufferSize</code> -  the buffer size</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="setReadPos(long)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>setReadPos</strong>(long readPos)</h4>
                                <p> Sets the position from which data will be read from when using the file as a <a href='../../../../../io/vertx/groovy/core/streams/ReadStream.html' title='ReadStream'>ReadStream</a>.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>readPos</code> -  the position in the file</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="setWritePos(long)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>setWritePos</strong>(long writePos)</h4>
                                <p> Sets the position from which data will be written when using the file as a <a href='../../../../../io/vertx/groovy/core/streams/WriteStream.html' title='WriteStream'>WriteStream</a>.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>writePos</code> -  the position in the file</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="setWriteQueueMaxSize(int)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>setWriteQueueMaxSize</strong>(int maxSize)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="write(io.vertx.groovy.core.buffer.Buffer)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>write</strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> data)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="write(io.vertx.groovy.core.buffer.Buffer, long, Handler<AsyncResult<Void>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html'>AsyncFile</a> <strong>write</strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> buffer, long position, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; handler)</h4>
                                <p> Write a <a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html' title='Buffer'>Buffer</a> to the file at position <code>position</code> in the file, asynchronously.
 <p>
 If <code>position</code> lies outside of the current size
 of the file, the file will be enlarged to encompass it.
 <p>
 When multiple writes are invoked on the same file
 there are no guarantees as to order in which those writes actually occur
 <p>
 The handler will be called when the write is complete, or if an error occurs.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>buffer</code> -  the buffer to write</DD><DD><code>position</code> -  the position in the file to write it at</DD><DD><code>handler</code> -  the handler to call when the write is complete</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="writeQueueFull()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>boolean <strong>writeQueueFull</strong>()</h4>
                                <p> This will return <code>true</code> if there are more bytes in the write queue than the value set using <a href='../../../../../io/vertx/groovy/core/file/AsyncFile.html#setWriteQueueMaxSize' title='AsyncFile.setWriteQueueMaxSize'>AsyncFile.setWriteQueueMaxSize</a>
   <DL><DT><B>Returns:</B></DT><DD>true if write queue is full</DD></DL></p>
                            </li>
                        </ul>
                    
                </li>
            </ul>
            
        </li>
    </ul>
</div>

<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
    <!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="../../../../../overview-summary.html">Overview</a></li>
        <li><a href="package-summary.html">Package</a></li>
        <li class="navBarCell1Rev">Class</li>
        <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
        <li><a href="../../../../../index-all.html">Index</a></li>
        <li><a href="../../../../../help-doc.html">Help</a></li>
    </ul>
</div>

<div class="subNav">
    <div>
        <ul class="navList">
            <li><a href="../../../../../index.html?io/vertx/groovy/core/file/AsyncFile" target="_top">Frames</a></li>
            <li><a href="AsyncFile.html" target="_top">No Frames</a></li>
        </ul>
    </div>
    <div>
        <ul class="subNavList">
            <li>Summary:&nbsp;</li>
            Nested&nbsp;&nbsp;&nbsp;Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_summary">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_summary">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
        <ul class="subNavList">
            <li>&nbsp;|&nbsp;Detail:&nbsp;</li>
            Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_detail">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_detail">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
    </div>
    <p>Groovy Documentation</p>
    <a name="skip-navbar_bottom">
        <!--   -->
    </a>
    </div>
</div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>